program define ziop1, eclass
    version 10.1
    syntax varlist [if] [in], INFLate(varlist) [vce(passthru)] [CLuster(varname)] ///
       [robust] [TECHnique(passthru)] [difficult] 

    //  Separate the d.v. from i.v.(s).
    gettoken dv xvars : varlist
	
	if "`cluster'" != "" {
	local clopt cluster(`cluster')
       }
	if "`robust'" != "" {
	local vce = "robust"
       }	
    ml model lf ziopnr_lf                     ///
        (Beta:  `dv' = `xvars')               ///
        (Gamma:  `dv' = `inflate')            ///
        /cut2                                 ///
        , title(Zero-inflated Ordered Probit) ///
        `vce'                                 ///
	`clopt'				      ///	
        `technique'
    ml maximize, `difficult'
end

